DIR=CV-2015-fr
TEX=main.tex

PDF=$(TEX:.tex=.pdf)

CV=CV-francais-2015

all: $(CV).pdf

$(CV).pdf: $(TEX)
	pdflatex -shell-escape $<
	pdflatex -shell-escape $<
	gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dNOPAUSE -dQUIET -dBATCH -sOutputFile=$@ $(PDF)

clean:
	rm -f *.aux *.cut *.out *.aux *.log *~ $(PDF)

clean-pdf:
	rm -f $(CV).pdf

open:
	emacs *.tex &

open-sty:
	emacs *.sty &

open-all:
	emacs *.tex *.sty &

read:
	evince $(CV).pdf &

tar:	clean
	tar cvf ../$(DIR).tar ../$(DIR)
	gzip ../$(DIR).tar

.PHONY: clean
